﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace pictureAnalyse
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //Application.Run(new Form_ColorViewer());
            //Application.Run(new Form_ColorGroupSplit());
            Application.Run(new FormPannel());
            //Application.Run(new FormLineChart());
        }

        ///// <summary>
        ///// 应用程序的主入口点。
        ///// </summary>
        //[STAThread]
        //static void Main(String[] args)
        //{
        //    Application.EnableVisualStyles();
        //    Application.SetCompatibleTextRenderingDefault(false);

        //    FormLineChart chart = new FormLineChart();  // 显示一个ChartLine窗体
        //    ChartBox chartBox = chart.chartBox;

        //    foreach (String arg0 in args)
        //    {
        //        String arg = arg0.Trim();

        //        if (arg.StartsWith("VALUES=")) chartBox.Values = getValues(arg.Substring(7));
        //        else if (arg.StartsWith("WIDTH=")) chart.Width = Int32.Parse(arg.Substring(6)) + 18;
        //        else if (arg.StartsWith("HEIGHT=")) chart.Height = Int32.Parse(arg.Substring(7)) + 40;
        //        else if (arg.StartsWith("COLORCHART=")) chartBox.ColorChart = getColor(arg.Substring(11));
        //        else if (arg.StartsWith("COLORLNE=")) chartBox.ColorLine = getColor(arg.Substring(9));
        //    }

        //    Application.Run(chart);
        //}

        //public static Color getColor(String valueStr)
        //{
        //    int[] A = getInt(valueStr);
        //    return Color.FromArgb(A[0], A[1], A[2]);
        //}

        //public static int[] getInt(String valueStr)
        //{
        //    String[] A = valueStr.Replace("，", ";").Replace(",", ";").Replace("；", ";").Split(';');
        //    int[] I = new int[A.Length];
        //    for (int i = 0; i < A.Length; i++)
        //    {
        //        I[i] = Int32.Parse(A[i].Trim());
        //    }

        //    return I;
        //}

        //public static float[] getValues(String valueStr)
        //{
        //    String[] A = valueStr.Replace("，", ";").Replace(",", ";").Replace("；", ";").Split(';');
        //    float[] F = new float[A.Length];
        //    for (int i = 0; i < A.Length; i++)
        //    {
        //        F[i] = float.Parse(A[i].Trim());
        //    }

        //    return F;
        //}
    }
}
